package org.tony.spider.core.entries;

import java.util.Arrays;

public class Command
    implements Comparable<Command>
{
  private Integer  squence;
  private CmdType  type;
  private String[] lables;

  public Integer getSquence()
  {
    return squence;
  }

  public void setSquence(Integer squence)
  {
    this.squence = squence;
  }

  public CmdType getType()
  {
    return type;
  }

  public void setType(CmdType type)
  {
    this.type = type;
  }

  public String[] getLables()
  {
    return lables;
  }

  public void setLables(String[] lables)
  {
    this.lables = lables;
  }

  public int compareTo(Command o)
  {
    return o.getSquence() > squence ? -1 : o.getSquence() == squence ? 0 : 1;
  }

  @Override
  public String toString()
  {
    return "Command [squence=" + squence + ", type=" + type + ", lables=" + Arrays.toString(lables) + "]";
  }

}
